//
//  UIView+Inspectable.swift
//  ZHLEEBlog_swift_pro
//
//  Created by ZHLEEBlander on 15/10/12.
//  Copyright © 2015年 ZHLEEBlander. All rights reserved.
//

import Foundation
import UIKit

@IBDesignable
extension UIView{

    @IBInspectable var cornerRadius: CGFloat{
    
        get{
            return self.layer.cornerRadius
        }
        set{
        
            self.layer.cornerRadius = newValue
        }
    }
    
    @IBInspectable var borderWidth:CGFloat{
    
        get{
            return self.layer.borderWidth
        }
        set{
            self.layer.borderWidth = newValue
        }
    }
    
    @IBInspectable var borderColor:UIColor{
    
        get{
            return UIColor(CGColor: self.layer.borderColor ?? UIColor.clearColor().CGColor)
        }
        set{
        
            self.layer.borderColor = newValue.CGColor
        }
    }
}